SQL Support

See "SQL Escape Sequences" for information about the SQL escape sequences supported by the JDBC driver.

Binding SQL Statements

A JDBC application can prepare a query that contains dynamic parameters. Each parameter in a SQL statement must be associated, or bound, to a variable in the application before the statement is executed. When the application binds a variable to a parameter, it describes that variable and that parameter to the driver. Therefore, the application must supply the following information:

The JDBC driver relies on the binding of parameters to know how to send information to the database system in its native format. The host variable data type and SQL data type are assumed to be the same. For example, setInt() indicates to the driver that the data type of the host variable and the SQL type of the dynamic parameter are both Integer. If the host variable and SQL data type are not the same, the application should use setObject() to specify the application variable data type and the SQL data type. If an application furnishes incorrect parameter binding information to the JDBC driver, the results will be unpredictable.

To ensure interoperability, the JDBC driver uses only the parameter binding information provided by the application. Although some DBMSs can publish dynamic parameter information back to a JDBC driver, others cannot. For example, both the SQL Server and Oracle query processors can determine that a parameter is an integer. However, the Oracle query processor cannot publish this information back to the SequeLink for JDBC driver.

NOTES: